home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
c
/
vbccwos.lha
/
vbcc
/
doc
/
vbccc16x.doc
< prev
next >
Wrap
Text File
|
1999-03-07
|
3KB
|
100 lines
vbcc - C compiler (c) in 1995-99 by Volker Barthelmann
INTRODUCTION
vbcc is a free portable and retargetable ANSI C compiler.
It is clearly split into a target independant and a target dependant
part and supports emulating datatypes of the target machine on any
other machine so that it is possible to e.g. make a crosscompiler for
a 64bit machine on a 32bit machine.
This document only deals with the target dependant parts of the
SAB c16x version.
This is a pre-alpha version!
LEGAL
vbcc is (c) in 1995-99 by Volker Barthelmann. All code is written by me
and may be freely redistributed as long as no modifications are made
and nothing is charged for it.
Non-commercial usage of vbcc is allowed without any restrictions.
Commercial usage needs my written consent.
Sending me money, gifts, postcards etc. would of course be very nice
and may encourage further development of vbcc, but is not legally or
morally necessary to use vbcc.
ADDITIONAL OPTIONS FOR THIS VERSION
-merge-constants
Place identical floating point constants at the same
memory location. This can reduce program size and increase
compilation time.
-const-in-data
By default constant data will be placed in the code
section (and therefore is accessable with faster pc-relative
addressing modes). Using this option it will be placed in the
data section.
Note that on operating systems with memory protection this
option will disable write-protection of constant data.
SOME INTERNALS
The current version generates assembly output for use with the Tasking
assembler using the small memory model. The generated code should work on
systems with c161, c163, c164, c165 and c167 microcontrollers. Old
versions like the c166 are not supported
The register names are:
r0 through r15 for the general purpose registers and
The registers r1-r5 and r10-r15 are used as scratch registers (i.e. they
can be destroyed in function calls), all other registers are preserved.
r0 is used as user stack pointer. Automatic variables and temporaries
are put on the user stack. Return addresses are pushed on the system
stack.
The first 4 function arguments which have integer or pointer types
are passed in registers r12 through r15.
Integers and pointers are returned in r4.
All other types are returned by passing the function the address
of the result as a hidden argument - so when you call such a function
without a proper declaration in scope you can expect a crash.
The elementary data types are represented like:
type size in bits alignment in bytes
char 8 1
short 16 2
int 16 2
long currently not supported
all pointers 16 2
float currently not supported
double currently not supported
STDARG
To be written...
KNOWN PROBLEMS
- lots...
Volker Barthelmann volker@vb.franken.de